#include<iostream>
#include<unistd.h>
using namespace std;

int galv = 100;

int main()
{
  int i = 0;
  pid_t id = fork();
  if(id > 0)
  {
    while(1)
    {
      cout << " i am father! galv = " << galv << " &galv = " << &galv << endl;
      sleep(1);
    }
  }
  else 
  {
    while(1)
    {
      cout << " i am child! galv = " << galv << " &galv = " << &galv << endl;
      ++i;
      sleep(1);
      if(i == 5)
      {
        galv = 200;
      }
    }
  }
  return 0;
}
